using MESBaseis.Domain.BaseEntities;

namespace MESBaseis.Domain.ZSHH
{
    /// <summary>
    /// 销售订单表
    /// </summary>
    public class SalesOrder : BaseModel
    {
        /// <summary>
        /// 销售单号 (如: XSDH001)
        /// </summary>
        public string SalesOrderNumber { get; set; } = string.Empty;

        /// <summary>
        /// 销售订单主题
        /// </summary>
        public string SalesOrderSubject { get; set; } = string.Empty;

        /// <summary>
        /// 客户名称
        /// </summary>
        public string CustomerName { get; set; } = string.Empty;

        /// <summary>
        /// 销售日期
        /// </summary>
        public DateTime SalesDate { get; set; }

        /// <summary>
        /// 采购状态 (未完成、已完成)
        /// </summary>
        public string PurchaseStatus { get; set; } = "未完成";

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }

        // 导航属性
        public virtual ICollection<SalesOrderItem> SalesOrderItems { get; set; } = new List<SalesOrderItem>();
        public virtual ICollection<ProductionPlan> ProductionPlans { get; set; } = new List<ProductionPlan>();
    }
}